<html>
<head>
<script language=javascript>

function post () {
	var feed = document.getElementById("feed").value;
	var uri = document.getElementById("uri").value;

	var req = new XMLHttpRequest();
	req.open("POST", "/feed/" + feed, true);

	req.onreadystatechange = function () {
		if (req.readystate == 4 && req.status != 200) {
			alert("POST failed: " + req.responseText);
		}
	}

	
	req.send(uri);

	alert("POST'd");
}
</script>
</head>
<body>
	feed name: <input type=text id=feed value="test"><br>
	URL to share: <input type=text id=uri value="http://google.com"><br>
	<button onclick="post()">POST</button>
</body>
</html>
